﻿// -----------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All rights reserved.
// -----------------------------------------------------------------------
using System;
using System.Collections.Generic;

namespace Microsoft.Internal.Collections
{
    public static class DictionaryExtensions
    {
        public static bool ContainsAllKeys<TKey, TValue>(this IDictionary<TKey, TValue> dictionary, IEnumerable<TKey> keys)
        {
            foreach (TKey key in keys)
            {
                if (!dictionary.ContainsKey(key))
                    return false;
            }

            return true;
        }
    }
}